package com.kaifamiao.N0824;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Date;

public class Node2 {

    public static void main(String[] args) {
        Date date = new Date();
        System.out.println(date);
        Instant integer = date.toInstant();

        Instant instant = date.toInstant();
        ZonedDateTime zonedDateTime = instant.atZone(ZoneId.systemDefault());
        ZonedDateTime zonedDateTime1 = instant.atZone(ZoneId.of("Europe/Paris"));
        LocalDateTime localDateTime = zonedDateTime.toLocalDateTime();
        LocalDateTime localDateTime1 = zonedDateTime1.toLocalDateTime();
        System.out.println(localDateTime);
        System.out.println(localDateTime1);

        LocalDateTime localDateTime11 = LocalDateTime.now();
        ZonedDateTime zonedDateTime2 = localDateTime11.atZone(ZoneId.of("Europe/Paris"));
        Instant instant2 = zonedDateTime2.toInstant();
        Date from = Date.from(instant2);
        System.out.println(from);
    }
}
